<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/core/common/top.jsp" %>
<fmt:bundle basename="resourceBundle.properties"/>
<c:choose>
<c:when test="${fn:length(USER_PERMISSION_SESSION) >0 }">

<!--首先将Java的Menu对象转换成Javascript的对象-->
<!--Javascript的Menu对象和Java的Menu对象结构一样-->

<script language="javascript">
	
		var mItems_var = new Array();
		var mItem_var;
		
		var hasShortCut = false;
		var hasThirdLevelMenu = false;		
		var defaultPage="welcome.html";
		
		var defaultDisGroupKey="";
		
		<c:set var="hasShortCut" value="false" />
		<c:set var="showShorcut" value="false" />
		<c:set var="defaultPage" value="welcome.html" />
		
		<c:forEach items="${newMenus}" var="obj">
        
			mItem_var = new Object();
			//循环赋值
			mItem_var.menuPk = '${obj.menuPk}';
			mItem_var.parentMenuId = <c:choose><c:when test="${obj.parentMenuId<10000}">''</c:when><c:otherwise>'<c:out value="${obj.parentMenuId}" />'</c:otherwise></c:choose>;
			mItem_var.level = <c:choose><c:when test="${obj.parentMenuId<10000}">1</c:when><c:otherwise>2</c:otherwise></c:choose>;
			
			<c:if test="${obj.level>=3}">
			  hasThirdLevelMenu = true;
			</c:if>
			mItem_var.url = "${obj.url}";
			mItem_var.actived = '<c:out value="${obj.actived}" default="Y" />';
		    mItem_var.description = '<s:text name="%{#attr.obj.description}"></s:text>';
		    mItem_var.checked = '<c:out value="${obj.checked}" default="N" />';
		    mItem_var.isShortcut = '<c:out value="${obj.isShortcut}" default="Y" />';

            
		    mItem_var.iconName = '${obj.iconName}';
		    mItem_var.disIconName = '${obj.disIconName}';
		    mItem_var.shortCutSort = <c:out value="${obj.shortCutSort}" default="0" />;
		    mItem_var.sort = '${obj.sort}';
			mItem_var.mouseOverIconName = '${obj.mouseOverIconName}';
			mItem_var.hrefType = "";
			mItem_var.href = "";
            mItems_var.push(mItem_var);
            	
		</c:forEach>		
		
		
        
        if(hasThirdLevelMenu){
            hasThirdLevelMenu = true;
        }
	
		//alert("total menus:"+mItems_var.length);
		<!--组织禁用组菜单-->
		var mapList = new Array();
		<c:forEach items="${DISABLEMENUINFO}" var="infoMap">
			var disMap = new Object();
			disMap.key = '${infoMap.key}';
			var disMenus = new Array();
			<c:forEach items="${infoMap.value}" var="pk">
				disMenus.push('${pk}');					
			</c:forEach>
			disMap.value = disMenus;
			mapList.push(disMap);
		</c:forEach>
		
		//alert(mapList.length);
	
		//将一个URL中添加一个timestamp参数
		function addTimestampParam(url){
			var tempUrl = "";
			
			//假定只有一个？号
			if(url.indexOf("?")==-1){
				//无？
				tempUrl = url+"?systime="+(new Date()).getTime();
				//alert(tempUrl);
			}else{
				//有？
				tempUrl = url.substring(0,url.indexOf("?"))+"?systime="+(new Date()).getTime()+"&"+url.substring(url.indexOf("?")+1);
				//alert(tempUrl);
			}
			
			return tempUrl;
		}

		//禁用一组菜单
		function disabledMenuGroup(key){
			//循环取出一组菜单，然后分别在快捷和一二三级菜单条中找，如果在其中就禁用
			for(var i=0;i<mapList.length;i++){
				//判断传入的key是不是mapList中的一个元素，如果不是则不做任何操作
				if(mapList[i].key == key){
					var disMapList = mapList[i].value;
					//alert(disMapList.length);
					
					//清除二级三级菜单并重新生成一级菜单
					changeKuangTableTDObjClass("");
					clearTable1("submenuTableLevel2");
					if(hasThirdLevelMenu){	
						clearTable1("submenuTableLevel3");
					}
								
					clearTable2("submenuTableLevel1");
					
					
					
					for(var j=0;j<disMapList.length;j++){
						var pk = disMapList[j];					
						var menuObj = getMenuItemByPk(pk);
						
						if(menuObj != null){
							//将菜单列表中的所有的对象的active设置成'N'
							for(var k=0;k<mItems_var.length;k++){
								if(mItems_var[k].menuPk == menuObj.menuPk){
									mItems_var[k].actived = 'N';
								}
							}
							
							//开始禁用							
							if(menuObj.isShortcut == 'Y'){						
								//快捷菜单的禁用
								if(hasShortCut){	
									disabled_swapImg(menuObj.menuPk,menuObj.level);
								}								
									
							}
						}
					}
					
					createRootMenu1(getChildMenuItemByMenuPk({menuPk:'',level:0}));					
										
					break;
				}else{
					continue;
				}
			}
			
			//将页面转到欢迎页面
			var mainframe = document.getElementById("mainframe");
			mainframe.src = "${ctx}/"+addTimestampParam(defaultPage);
			//submit_ajax("${ctx}/"+addTimestampParam(defaultPage));
			//ajaxpag("${ctx}/"+addTimestampParam(defaultPage), "mainframe");
		}
		
		//启用一组菜单
		function enabledMenuGroup(key){
			//循环取出一组菜单，然后分别在快捷和一二三级菜单条中找，如果在其中就启用
			for(var i=0;i<mapList.length;i++){
				//判断传入的key是不是mapList中的一个元素，如果不是则不做任何操作
				if(mapList[i].key == key){
					var disMapList = mapList[i].value;
					//alert(disMapList.length);
					
					//清除二级三级菜单并重新生成一级菜单
					changeKuangTableTDObjClass("");
					clearTable1("submenuTableLevel2");
					if(hasThirdLevelMenu){	
						clearTable1("submenuTableLevel3");
					}
								
					clearTable2("submenuTableLevel1");
					
					
					
					for(var j=0;j<disMapList.length;j++){
						var pk = disMapList[j];					
						var menuObj = getMenuItemByPk(pk);
						
						if(menuObj != null){
							//将菜单列表中的所有的对象的active设置成'Y'
							for(var k=0;k<mItems_var.length;k++){
								if(mItems_var[k].menuPk == menuObj.menuPk){
									mItems_var[k].actived = 'Y';
								}
							}
							
							//开始禁用							
							if(menuObj.isShortcut == 'Y'){						
								//快捷菜单的禁用
								if(hasShortCut)	{
									enabled_swapImg(menuObj.menuPk,menuObj.level);
								}						
									
							}
						}
					}
					
					createRootMenu1(getChildMenuItemByMenuPk({menuPk:'',level:0}));					
										
					break;
				}else{
					continue;
				}
			}
			
			//将页面转到欢迎页面
			//var $mainframe = $("#mainframe");
			var mainframe = document.getElementById("mainframe");
			mainframe.src = "${ctx}/"+addTimestampParam(defaultPage);
			//submit_ajax("${ctx}/"+addTimestampParam(defaultPage));
			//ajaxpag("${ctx}/"+addTimestampParam(defaultPage), "mainframe");		
		}
		//生成一级菜单
		function createRootMenu1(menuList){
			//var trNode = document.getElementById("submenuTableLevel1").childNodes[0].childNodes[0];
			$trNode = $("#submenuTableLevel1 > tr:eq(0)");
			//alert("进入生成一级菜单");
			for(var i=0;i<menuList.length;i++){
				var $tdNode = $("<td class='top_style1' width='2%' style='whiteSpace:nowrap' onmousedown='changeRootMenuColor'>&nbsp;"+menuList[i].description+"&nbsp;</td>");
				//tdNode.className = "top_style1";
				//tdNode.width="2%";
				
				//tdNode.onmousedown = changeRootMenuColor;
				//tdNode.style.whiteSpace = "nowrap";
				
				if((menuList[i].url!=""||getChildMenuItemByMenuPk(menuList[i]).length!=0)&&menuList[i].actived!='N'){
				    
				    //var a = new Array();
				    //a["menuPk"] = menuList[i].menuPk;
				    
				    //a["level"] = menuList[i].level;
				    //tdNode.onclick=clickMenu(a);
				    setMenuHref("onclick","clickMenu({menuPk:'"+menuList[i].menuPk+"',level:"+menuList[i].level+"})",menuList[i].menuPk);
			      
					//tdNode.innerHTML = "<a href=\'javascript:clickMenu({menuPk:\""+menuList[i].menuPk+"\",level:"+menuList[i].level+"});\'>&nbsp;"+menuList[i].description+"&nbsp;</a>";
				}
				
				
				//tdNode.innerHTML = "&nbsp;"+menuList[i].description+"&nbsp;";
				
				//trNode.appendChild(tdNode);
				$trNode.append($tdNode);
				if(i!=menuList.length-1){
					var $tdNode = $("<td width='2%' align='center' >|</td>");
					//var tdNode = document.createElement("TD");
					//tdNode.width="2%";
					//tdNode.align = "center";
					//tdNode.innerHTML = "|";
					//trNode.appendChild(tdNode);
					$trNode.append($tdNode);
				}
			}
			var $tdNode = $("<td width='99%' ></td>");
			$trNode.append($tdNode);
			//var tdNode = document.createElement("TD");
			//tdNode.width="99%";
			//trNode.appendChild(tdNode);			
			//alert(document.getElementById("submenuTableLevel1").innerHTML);
		}			
		//鼠标放到上面后图标的变化
		function MouseOver_swapImg(pk,l) {
			//alert(menuPk+"/"+level);
			var shortcutImage = document.getElementById("shortcutImage_"+pk);	
			
			var menuObj = new Object();
			menuObj.menuPk = pk;
			menuObj.level = l;
			
			menuObj = getMenuItemByMenuPk(menuObj);
			
			shortcutImage.src = "${ctx}"+"/"+menuObj.mouseOverIconName;
		}

		//禁用后图标的变化
		function disabled_swapImg(pk,l) {
			var shortcutImage = document.getElementById("shortcutImage_"+pk);	
			
			for(var i=0;i<3;i++){
				var tdNode = shortcutImage.parentNode;
				if(tdNode.tagName=="TD")
					break;
				else{
					tdNode = tdNode.parentNode;
				}
			}		
			
			//alert(tdNode.innerHTML);
			if(shortcutImage != null){
				var menuObj = new Object();
				menuObj.menuPk = pk;
				menuObj.level = l;
				
				//alert(linkObj.tagName);	
				
				tdNode.appendChild(shortcutImage);
				menuObj = getMenuItemByMenuPk(menuObj);
				shortcutImage.src = "${ctx}"+"/"+menuObj.disIconName;
			}
			//alert(shortcutImage.src);
		}
		
		//启用后图标的变化
		function enabled_swapImg(pk,l) {
			var shortcutImage = document.getElementById("shortcutImage_"+pk);	
			
			for(var i=0;i<3;i++){
				var tdNode = shortcutImage.parentNode;
				if(tdNode.tagName=="TD")
					break;
				else{
					tdNode = tdNode.parentNode;
				}
			}		
			
			//alert(tdNode.innerHTML);
			if(shortcutImage != null){
				var menuObj = new Object();
				menuObj.menuPk = pk;
				menuObj.level = l;
				
				//alert(linkObj.tagName);	
				
				tdNode.appendChild(shortcutImage);
				menuObj = getMenuItemByMenuPk(menuObj);
				shortcutImage.src = "${ctx}"+"/"+menuObj.iconName;
			}
			//alert(shortcutImage.src);
		}
		//鼠标移出的图标变化
		function MouseOut_swapImage(pk,l) {
			var shortcutImage = document.getElementById("shortcutImage_"+pk);	
			
			var menuObj = new Object();
			menuObj.menuPk = pk;
			menuObj.level = l;
			
			menuObj = getMenuItemByMenuPk(menuObj);
			
			shortcutImage.src = "${ctx}"+"/"+menuObj.iconName;
		}		
		
		//改变一级菜单的颜色
		function changeMenuColor(obj){
			//先清空一级菜单上所有的选中样式
			/*
			var list = document.getElementById("submenuTableLevel1").childNodes[0].childNodes[0].childNodes;
			
			for(var i=0;i<list.length;i++){
				if(list[i].tagName=="TD"){
					//alert(list[i].innerHTML);
					$(list[i]).attr("class","top_style1");
				}
			}*/
			$(".btnmenu_mousedown").attr("class","top_style1");
			$(obj).attr("class","btnmenu_mousedown");
		}
		
		//改变一级菜单的颜色
		function changeRootMenuColorForReturn(){
			//先清空一级菜单上所有的选中样式
			var list = document.getElementById("submenuTableLevel1").childNodes[0].childNodes[0].childNodes;
			for(var i=0;i<list.length;i++){
				if(list[i].tagName=="TD"){
					//alert(list[i].innerHTML);
					list[i].className="top_style1";
				}
			}
		

		}

		//改变一级菜单的颜色
		function changeRootMenuColor(){
			//先清空一级菜单上所有的选中样式
			var list = document.getElementById("submenuTableLevel1").childNodes[0].childNodes[0].childNodes;
			
			for(var i=0;i<list.length;i++){
				if(list[i].tagName=="TD"){
					//alert(list[i].innerHTML);
					list[i].className="top_style1";
				}
			}
			//从事件中获得触发对象
			var obj = event.srcElement.parentNode;
			//alert(obj.tagName);
			if(obj.tagName == "TD")
				obj.className="btnmenu_mousedown";			

		}		
		//改变二级菜单的颜色
		function changeMenuColor1(menuObj){	
			//先清空二级菜单上所有的选中样式
			var obj = null;
			var list = document.getElementById("submenuTableLevel2").childNodes[0].childNodes[0].childNodes;
			//alert(document.getElementById("submenuTableLevel2").childNodes[0].childNodes[0].innerHTML);
			for(var i=1;i<list.length-1;i++){

				if(list[i].tagName=="TD"){
				    if (menuObj){
				       if (list[i].menuPk==menuObj.menuPk){
				          obj = list[i];
				       }
				    }
					list[i].className = "white";
				}
			}				
			//从事件中获得触发对象
			if (!obj){
			   obj = event.srcElement.parentNode.parentNode;
			}
			if(obj.tagName == "TD")
				obj.className="btnmenu1_mousedown";
		}
		
		//改变快捷二级菜单的颜色
		function changeMenuColor_forShortcut(obj){		
			//先清空二级菜单上所有的选中样式
			var list = document.getElementById("submenuTableLevel2").childNodes[0].childNodes[0].childNodes;
			//alert(document.getElementById("submenuTableLevel2").childNodes[0].childNodes[0].innerHTML);
			for(var i=1;i<list.length-1;i++){
				if(list[i].tagName=="TD"){
					list[i].className = "white";
				}
			}				
			obj.className="btnmenu1_mousedown";
		}	
		
		//获得一个菜单在所在行的位置的TD对象
		function getIndexTDObj(menuObj){
			var TDObj;
			var index = 1;
			//如果level是1则是一级菜单，如果level是2则是二级菜单
			//alert(menuObj.description);
			//alert(menuObj.level);
			if(menuObj.level == 1){
				var list = getThisLevelMenus('1');
				//alert(list.length);
				for(var i=0;i<list.length;i++){		
					if(list[i].menuPk == menuObj.menuPk){
						index = i*2+1;
						break;
					}
				}
				//alert("index:"+index);
				//获得一级菜单的table对象中对于的TD对象
				TDObj = document.getElementById("submenuTableLevel1").childNodes[0].childNodes[0].childNodes[index];
			}else if(menuObj.level == 2){
				var list = getThisLevelMenus('2');
				var tempList = new Array();
				//从所有的二级菜单中获得主键是menuObj的父菜单的二级菜单项
				for(var i=0;i<list.length;i++){	
					if(list[i].parentMenuId == menuObj.parentMenuId){
						//alert(list[i].description);
						tempList.push(list[i]);
					}
				}			
				
				for(var i=0;i<tempList.length;i++){		
					if(tempList[i].menuPk == menuObj.menuPk){
						index = i*2+2;
						break;
					}
				}
				//alert("index:"+index);
				//获得二级菜单的table对象中对于的TD对象
				//alert(document.getElementById("submenuTableLevel2").childNodes[0].childNodes[0].innerHTML);
				TDObj = document.getElementById("submenuTableLevel2").childNodes[0].childNodes[0].childNodes[index];
			}
			//alert(TDObj.innerHTML);
			return TDObj;
		}
			
		//通过一个level来获得本level的所有menu的列表
		function getThisLevelMenus(l){
			var list = new Array();
			
			for(var i=0;i<mItems_var.length;i++){
				if(mItems_var[i].level == l){				
					list.push(mItems_var[i]);
				}
			}
			return list;
		}
				
		function clickMenu(menuObj){
			//alert(menuObj.menuPk);
			//如果点击的是一级菜单则清空二级菜单和三级菜单，如果点击的是二级菜单则清空三级菜单
			//alert("开始点击菜单clickMenu");
			//alert(menuObj.level);
			
			if(menuObj.level=='1'){
				//alert('clear level3 and level2 table');
				//不显示框
				changeKuangTableTDObjClass("");
				clearTable("submenuTableLevel2");
				clearTable("submenuTableLevel3");
				
				//重新生成快捷条
				var tableObj = document.getElementById("submenuTableLevel2");
				var table_tbody = tableObj.childNodes[0];
						
				var trNode = document.createElement("TR");

					
				table_tbody.appendChild(trNode);
					
				//二级菜单的占位条生成
					
				//var tableObj = document.getElementById("submenuTableLevel3");
				//var table_tbody = tableObj.childNodes[0];
				//if(table_tbody == null ){
				//	table_tbody = document.createElement("tbody");
				//	tableObj.appendChild(table_tbody);
				//}
				//var trNode = document.createElement("TR");
				var $trNode = $("<tr></tr>");
				$("#submenuTableLevel3").append($trNode);
				//table_tbody.appendChild(trNode);
				
											
			}else if(menuObj.level=='2'){
				//alert('clear level3 table');
				//alert("这是二级菜单");
				//alert(menuObj.url);
				clearTable("submenuTableLevel3");
				
				//三级菜单的占位条生成
				/*
				var tableObj = document.getElementById("submenuTableLevel3");
				var table_tbody = tableObj.childNodes[0];
					
				var trNode = document.createElement("TR");
				
				table_tbody.appendChild(trNode);
				*/
			}
			
			//通过menuObj获得该菜单的一个完整的对象
			menuObj = getMenuItemByMenuPk(menuObj);
		
		
			//如果是前台的应用则只有两级的菜单和一个快捷工具栏，如果是后台应用则有三级的菜单无快捷工具栏
			//如果是前台应用只显示二级菜单，如果是后台应用则显示三级菜单
			//alert( hasThirdLevelMenu);
			if(mItems_var!=null&&mItems_var.length!=0 && !hasThirdLevelMenu){
				document.getElementById("submenuTableLevel2").style.display="";
				document.getElementById("submenuTableLevel3").style.display="none";
			}else if(mItems_var!=null&&mItems_var.length!=0 && hasThirdLevelMenu){
				//alert(menuObj.level=='1');
				if(menuObj.level=='1'){
					//alert(getChildMenuItemByMenuPk(menuObj).length);
					if(getChildMenuItemByMenuPk(menuObj).length!=0){
						document.getElementById("submenuTableLevel2").style.display="";
						document.getElementById("submenuTableLevel3").style.display = "none";
					}else{
						document.getElementById("submenuTableLevel2").style.display = "";
						document.getElementById("submenuTableLevel3").style.display = "none";
					}
				}
				else if(menuObj.level=='2'){
					//alert(getChildMenuItemByMenuPk(menuObj).length);
					if(getChildMenuItemByMenuPk(menuObj).length!=0){
						document.getElementById("submenuTableLevel2").style.display="";
						document.getElementById("submenuTableLevel3").style.display="";
					}else{
						document.getElementById("submenuTableLevel3").style.display = "none";
					}
				}
			}
			
			
			//如果被点击的菜单的下没有子菜单且菜单的URL不是空则直接链接到它的URL上
			//首先获得IFrame的对象,他的名称必须是mainframe
			var mainframe = document.getElementById("mainframe");
			//alert("mainframe:" + mainframe);
			//然后获得该菜单的所有子菜单
			var childs = getChildMenuItemByMenuPk(menuObj);
			//alert(childs.length);
			if(childs.length==0){
				//无子菜单
				//alert("no child");
				if(menuObj.url!=""){
					//alert("进入此地");
					//alert('${base}/'+addTimestampParam(menuObj.url));
					mainframe.src = '${ctx}/'+addTimestampParam(menuObj.url);
					//submit_ajax("${pageContext.request.contextPath}/"+addTimestampParam(menuObj.url));
					//不显示框
					changeKuangTableTDObjClass("");
				}
				if(menuObj.level==2){
					/* 没有三级菜单的情况处理 */
					var tar1=document.getElementById("frm1");
					if(tar1!=undefined)tar1.style.display="none";
					var tar2=document.getElementById("frm2");
					if(tar2!=undefined)tar2.style.display="none";
				}

			}
			//alert(menuObj.level);
			//生成子菜单
			//alert(menuObj);
			createSubmenu(menuObj);	

		}


		//清除表格的方法
		function clearTable(tableName){
			var tableObj = document.getElementById(tableName);
			var table_tbody = tableObj.childNodes[0];
			//清除
			if(table_tbody != null && table_tbody.childNodes!= null ){
				for(var i=(table_tbody.childNodes.length-1);i>=0;i--){
					table_tbody.removeChild(table_tbody.childNodes[i]);
				}
			}			
		}
		
		//清除表格的方法
		function clearTable1(tableName){
			var tableObj = document.getElementById(tableName);
			var table_tbody = tableObj.childNodes[0];
			var table_tr = table_tbody.childNodes[0];
			//alert(table_tr.innerHTML);
			//清除
			for(var i=(table_tr.childNodes.length-1);i>=1;i--){
				if(i==(table_tr.childNodes.length-1)){
					table_tr.childNodes[i].style.backgroundColor = "";
				}else{
					table_tr.removeChild(table_tr.childNodes[i]);
				}
			}			
		}
		
		//清除表格的方法
		function clearTable2(tableName){
			var tableObj = document.getElementById(tableName);
			var table_tbody = tableObj.childNodes[0];
			var table_tr = table_tbody.childNodes[0];
			//alert(table_tr.innerHTML);
			//清除
			for(var i=(table_tr.childNodes.length-1);i>=1;i--){
				table_tr.removeChild(table_tr.childNodes[i]);
			}			
		}
		//隐藏快捷菜单
		function hiddenShortCut(){
		    var resoreIconIDObj = document.getElementById("resoreIconID");
			var obj = document.getElementById("shortcutDiv");
			var objImage = document.getElementById("shortcutImg");
			if( obj.style.display == "" || obj.style.display == "yes" ){
				obj.style.display = "none";
				//objImage.src = "${base}/core/images/left_02.gif";
				
				if (resoreIconIDObj){
				   resoreIconIDObj.style.cursor="pointer";
				   resoreIconIDObj.title="<s:text name='button.shortcutKey'/>";
				   resoreIconIDObj.innerHTML="<img onclick='hiddenShortCut();' src='${ctx}/core/images/icon_arrowhead.gif'/>"
				}
			}else{
				obj.style.display = "";
				//objImage.src = "${base}/core/images/left_02.gif";
				if (resoreIconIDObj){
			       resoreIconIDObj.style.cursor="";
				   resoreIconIDObj.title='';
				   resoreIconIDObj.innerHTML=""
				}
			}
			

		}		
		
		//根据一个父菜单生成子菜单
		function createSubmenu(parentMenu){
			//alert(parentMenu.level);
			//获得所有子菜单对象列表
			var childs = getChildMenuItemByMenuPk(parentMenu);
			//alert(childs.length);
			//根据parentMenu获得要生成的子菜单是在二级还是三级，然后获得相应的table的对象
			var tableObj;
			
			//alert(parentMenu.level);
			if(parentMenu.level==1){
				//要建立的是二级菜单
				//alert("要建立的是二级菜单");		
				tableObj = document.getElementById("submenuTableLevel2");
				var table_tbody = tableObj.childNodes[0];
				
				
				//var trNode = document.createElement("TR");
				var trNode = table_tbody.childNodes[0];
				trNode.height = "22";
				
				{
					var tdNode = document.createElement("TD");
					tdNode.id = "resoreIconID";
					tdNode.style.backgroundColor = "#5B6C97";
					tdNode.style.cursor = "pointer";
					tdNode.title = "<s:text name='button.shortcutKey'/>";
					
					var obj = document.getElementById("shortcutDiv");
					if( obj){
					   if  (obj.style.display == "" || obj.style.display == "yes"){
			           }else{
			              tdNode.innerHTML="<img onclick='hiddenShortCut();' src='${ctx}/core/images/icon_arrowhead.gif'/>"
			           }
				    }
					trNode.appendChild(tdNode);		
				}
				
				{
					var tdNode = document.createElement("TD");
					tdNode.style.backgroundColor = "#5B6C97";
					trNode.appendChild(tdNode);	
				}
	

				//循环增加子菜单
				for(var i=0;i<childs.length;i++){
					var tdNode = document.createElement("TD");
					tdNode.style.backgroundColor = "#5B6C97";
					tdNode.style.cursor = "pointer";
					tdNode.width="2%";
					$(tdNode).bind("mousedown",function(event){
							var obj = event.target;
							if(obj.tagName == "TD"){
								  for(var i = 0; i<mItems_var.length; i++){
										if (mItems_var[i].menuPk==obj.menuPk){  
										    changeMenuColor1(mItems_var[i]); 
									    	break;
									    }
								  }
							}
						});
					tdNode.style.whiteSpace = "nowrap";
					tdNode.style.fontSize = "12px";
					tdNode.menuPk = childs[i].menuPk;
					tdNode.className="white";
					//tdNode.height = "22";
					
					//var innerText = "<span class=\"white\">&nbsp;<a href=\'javascript:clickMenu({menuPk:\""+childs[i].menuPk+"\",level:"+childs[i].level+"});\'>&nbsp;"+childs[i].description+"&nbsp;</a></span>";
					
					//if((childs[i].url=="" && getChildMenuItemByMenuPk(childs[i]).length==0) || childs[i].actived == 'N'){
					//	innerText = "<span class=\"white\">&nbsp;&nbsp;"+childs[i].description+"&nbsp;&nbsp;</span>";						
					//}
					
					$(tdNode).bind("click",function(event){
						var obj = event.target;
						if(obj.tagName == "TD"){
							  for(var i = 0; i<mItems_var.length; i++){
									if (mItems_var[i].menuPk==obj.menuPk){  
									    clickMenu(mItems_var[i]); 
								    	break;
								    }
							  }
						}
					});
							
					
					setMenuHref("onclick","clickMenu({menuPk:'"+childs[i].menuPk+"',level:"+childs[i].level+"})",childs[i].menuPk);		
					
					tdNode.innerHTML = "&nbsp;"+childs[i].description+"&nbsp;";
					
					//tdNode.innerHTML = innerText;
					trNode.appendChild(tdNode);		
					
					if(i<=childs.length-2){
						var tdNode = document.createElement("TD");
						tdNode.style.backgroundColor = "#5B6C97";
						tdNode.className="white";
						tdNode.style.whiteSpace = "nowrap";
						tdNode.innerHTML = "|";
						trNode.appendChild(tdNode);						
					}
				}		
				
				if(childs.length!=0){
				    var showChild = childs[0];
				    for (var k=0;k<childs.length;k++){
				       if (childs[k].checked=="Y" && childs[k].url!=""){
				         showChild = childs[k];
				         break;
				       }
				    }
					
					//判断二级菜单的第一个菜单的URL是不是不为""，如果是则链接到该地址
					if(showChild.url!=""){
						var child1s = getChildMenuItemByMenuPk(showChild);
						
						if(child1s.length==0){
							var mainframe = document.getElementById("mainframe");
	                        //alert("进入mainframe: 762行");
							var parentTDObj = getIndexTDObj(showChild);
		
							changeMenuColor_forShortcut(parentTDObj);
							mainframe.src = '${ctx}/'+addTimestampParam(showChild.url);
							//submit_ajax("${pageContext.request.contextPath}/"+addTimestampParam(showChild.url));
						}else{						
							clickMenu(showChild);
							var parentTDObj = getIndexTDObj(showChild);	
							changeMenuColor_forShortcut(parentTDObj);
						}
					}
					
								
				}
				
				var tdNode = document.createElement("TD");
				tdNode.style.backgroundColor = "#5B6C97";
				tdNode.width="99%";
				//tdNode.style.whiteSpace = "nowrap";
				trNode.appendChild(tdNode);
				//alert(trNode.innerHTML);
				if(getChildMenuItemByMenuPk(childs[0])==undefined||getChildMenuItemByMenuPk(childs[0])==""){
					/* 没有三级菜单的情况处理 */
					var tar1=document.getElementById("frm1");
					if(tar1!=undefined)tar1.style.display="none";
					var tar2=document.getElementById("frm2");
					if(tar2!=undefined)tar2.style.display="none";
				}
			}else if(parentMenu.level==2){
				<!--if mItems[0].usedType="backoffice"-->
				<%--
				//要建立的是三级菜单,生成Tab
				tableObj = document.getElementById("submenuTableLevel3");
				var table_tbody = tableObj.childNodes[0];
				//alert(table_tbody.innerHTML);
				//var trNode = document.createElement("TR");
				var trNode = table_tbody.childNodes[0];
				
				//循环增加子菜单
				//alert(childs.length);
				for(var i=0;i<childs.length;i++){
					//对于第一个子菜单是默认选中的样式
					
					//alert(childs[i].url);
					var tdNode;
					if(i==0){
						tdNode = document.createElement("TD");
						tdNode.height="24";
						tdNode.width="5%";
						tdNode.style.whiteSpace = "nowrap";

						tdNode.innerHTML = "<table height=\"21\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"width:2%; cursor:pointer;\"><tr><td height=\"21\" width=\"5\" class=\"no_underline1\"><img height=\"21\" src=\"${ctx}/core/images/blue_left.gif\" /></td><td height=\"21\" onclick=\"clickTabMenu('"+childs[i].url+"',"+(i+1)+");\" align=\"center\" class=\"tab_button_blue\" nowrap=\"nowrap\">&nbsp;&nbsp;"+childs[i].description+"&nbsp;&nbsp;</td><td width=\"5\"  height=\"21\" class=\"no_underline1\"><img height=\"21\" src=\"${ctx}/core/images/blue_right.gif\" /></td></tr></table>"
						
						//调用第一的子菜单的URL
						var mainframe = document.getElementById("mainframe");
						//alert(mainframe);
						
						if(childs[0].url!=""){
							changeKuangTableTDObjClass("kuang");
							//alert('${base}/'+addTimestampParam(childs[0].url));
							mainframe.src = '${ctx}/'+addTimestampParam(childs[0].url);
						}
												
					}else{
						tdNode = document.createElement("TD");
						tdNode.height="24";
						tdNode.width="5%";
						tdNode.style.whiteSpace = "nowrap";
						tdNode.innerHTML = "<table height=\"21\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"width:2%; cursor:pointer;\"><tr><td height=\"21\" width=\"5\" class=\"tab_underline1\"><img height=\"21\" src=\"${ctx}/core/images/gray_left.gif\" /></td><td height=\"21\" onclick=\"clickTabMenu('"+childs[i].url+"',"+(i+1)+");\" align=\"center\" class=\"tab_button_gray\" nowrap=\"nowrap\">&nbsp;&nbsp;"+childs[i].description+"&nbsp;&nbsp;</td><td height=\"21\" width=\"5\"  class=\"tab_underline1\"><img height=\"21\" src=\"${ctx}/core/images/gray_right.gif\" /></td></tr></table>"						
					}
					
					setMenuHref("onclick","clickTabMenu('"+childs[i].url+"',"+(i+1)+")",childs[i].menuPk);
					
					trNode.appendChild(tdNode);
					//alert(tdNode);
			
				}			
												
				var textNode = document.createTextNode(" ");
											
				var tdNode = document.createElement("TD");
				tdNode.width="95%";
				tdNode.height="18";
				tdNode.style.whiteSpace = "nowrap";
				tdNode.className = "tab_underline1";

				tdNode.appendChild(textNode);
				trNode.appendChild(tdNode);	
				//if end
				--%>
				//要建立的是三级菜单
				//alert(childs.length);
				if(childs.length==0)return;
				tableObj = document.getElementById("submenuTableLevel3");
				var table_tbody = tableObj.childNodes[0];
				//alert(table_tbody.innerHTML);
				var trNode = document.createElement("TR");
				var tdNode = document.createElement("TD");
				tdNode.height="23";
				tdNode.background="../core/images/main_34.gif";
				 var str="<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
				 str+="<tr><td width=\"9%\">&nbsp;</td><td width=\"82%\">";
				 str+="<div align=\"center\" class=\"black_cu\">"+parentMenu.description+"</div></td>";
				 str+="<td width=\"9%\">&nbsp;</td></tr></table>";
				 tdNode.innerHTML=str;
				tdNode.align="center";
				trNode.appendChild(tdNode);
				table_tbody.appendChild(trNode);
				for(var i=0;i<childs.length;i++){
					var trNode = document.createElement("TR");
					var tdNode = document.createElement("TD");
					tdNode.height="52";
					tdNode.style.whiteSpace = "nowrap";
					tdNode.innerHTML = "<a href=\"javascript:clickThirdMenu('"+childs[i].menuPk+"','"+childs[i].level+"')\" onmouseout=\"MouseOut_swapImage('"+childs[i].menuPk+"','"+childs[i].level+"')\" onmouseover=\"MouseOver_swapImg('"+childs[i].menuPk+"','"+childs[i].level+"')\" ><img id='shortcutImage_"+childs[i].menuPk+"'  src='${ctx}/"+childs[i].iconName+"' name='shortcutImage_"+childs[i].menuPk+"' width='52' height='52' border='0'/></a></td></tr><tr><td height='15' align='center'>"+childs[i].description;
					setMenuHref("onclick","clickTabMenu('"+childs[i].url+"',"+(i+1)+")",childs[i].menuPk);
					trNode.appendChild(tdNode);
					table_tbody.appendChild(trNode);
					if(i==0){//调用第一的子菜单的URL
						var mainframe = document.getElementById("mainframe");
						//alert("进入mainframe: 886行");
						if(childs[0].url!=""){
							changeKuangTableTDObjClass("kuang");
							//alert('${ctx}/'+addTimestampParam(childs[0].url));
							mainframe.src = '${ctx}/'+addTimestampParam(childs[0].url);
							//submit_ajax("${pageContext.request.contextPath}/"+addTimestampParam(childs[0].url));
						}
					}
				}
				var tar1=document.getElementById("frm1");
				tar1.style.display="";
				var tar2=document.getElementById("frm2");
				tar2.style.display="";
				tar1.className="left_menu";
			}
			

		}
		
		
		//处理三级菜单点击事件
		function clickTabMenu(url,index){
			//alert(index);
			//获得三级菜单的Table然后对除了被点击的TD所有的TD元素里的
			var tableObj = document.getElementById("submenuTableLevel3");
			var table_tbody = tableObj.childNodes[0];
			
			var tdList = table_tbody.childNodes[0].childNodes;		
			
			//alert(table_tbody.childNodes[0].innerHTML);
			for(var i=0;i<tdList.length-1;i++){
				//alert(i==index);
				if(i==(index-1)){
					//被点击的TD对象
					tdList[i].innerHTML = tdList[i].innerHTML.replace(/gray_left/gi,'blue_left');
					tdList[i].innerHTML = tdList[i].innerHTML.replace(/gray_right/gi,'blue_right');
					tdList[i].innerHTML = tdList[i].innerHTML.replace(/tab_button_gray/gi,'tab_button_blue');
					tdList[i].innerHTML = tdList[i].innerHTML.replace(/tab_underline1/gi,'no_underline1');

				}else{
					//其他未被点击的TD对象
					tdList[i].innerHTML = tdList[i].innerHTML.replace(/blue_left/gi,'gray_left');
					tdList[i].innerHTML = tdList[i].innerHTML.replace(/blue_right/gi,'gray_right');
					tdList[i].innerHTML = tdList[i].innerHTML.replace(/tab_button_blue/gi,'tab_button_gray');
					tdList[i].innerHTML = tdList[i].innerHTML.replace(/no_underline1/gi,'tab_underline1');
				}
				
			}
			

			//如果被点击的菜单的的URL不是空则直接链接到它的URL上
			//首先获得IFrame的对象,他的名称必须是mainframe
			var mainframe = document.getElementById("mainframe");
			if(url!=""){
				//alert('${ctx}/'+url);
				//alert('${ctx}/'+addTimestampParam(url));
				mainframe.src = '${ctx}/'+addTimestampParam(url);
				//submit_ajax("${pageContext.request.contextPath}/"+addTimestampParam(url));
				changeKuangTableTDObjClass("kuang");
			}else{
				return;
			}
			return;
		}
				
		//点击快捷键菜单的动作，一级二级菜单要联动，且高亮显示选中的菜单
		function clickShortCutMenu(pk,l){
			   var parentArr = new Array();
				 var menuObj = new Object();
				 menuObj.menuPk = pk;
				 menuObj.level = l;
				 menuObj = getMenuItemByMenuPk(menuObj);
				 var selmenuObj = menuObj;
		 		 if(menuObj!=null){
				   parentArr.push(menuObj);
				 }
				 
				 while(menuObj!=null){
						 menuObj = getMenuItemByMenuPk(menuObj);	
						 menuObj = getParentMenuObj(menuObj);
						 if(menuObj!=null){
						   parentArr.push(menuObj);
						 }
				 }
				 
				 for(var i = parentArr.length-1;i>=0;i--){
				    	if (parentArr[i].hrefType=="onclick"){
						 	  eval(parentArr[i].href);
						}else{
						 	  var mainframe = document.getElementById("mainframe");
						      mainframe.src = '${ctx}/'+addTimestampParam(parentArr[i].href);
						      //submit_ajax("${pageContext.request.contextPath}/"+addTimestampParam(parentArr[i].href),"mainframe");
					    }
				 }
				 
				 if (selmenuObj.level=='2'){
				     changeMenuColor1(selmenuObj);
				 }

					
		}
		
		//点击三级菜单键菜单的动作，且高亮显示选中的菜单
		function clickThirdMenu(pk,l){
			var menuObj = new Object();
			menuObj.menuPk = pk;
			menuObj.level = l;
			menuObj = getMenuItemByMenuPk(menuObj);
			var mainframe = document.getElementById("mainframe");
			//alert(menuObj.url);
			 mainframe.src = '${ctx}/'+addTimestampParam(menuObj.url);
			 //submit_ajax("${pageContext.request.contextPath}/"+addTimestampParam(menuObj.url));
			//changeMenuColor1(menuObj);
			
		}		
		
		//获得父对象，如果没有返回null
		
		function getParentMenuObj(menuObj){
			
				for(var i=0;i<mItems_var.length;i++){
					if(mItems_var[i].menuPk == menuObj.parentMenuId){
						 return mItems_var[i];
					}
				}
				return null;
		}
		
		
		//alert(mItems_var[0].menuPk);
		//通过一个菜单的对象来获得其子菜单对象的数组
		function getChildMenuItemByMenuPk(menuObj){
			//循环从mItems_var中找parentMenuId==menuObj.menuPk and level=menuObj.level+1的menuObj
			//alert(menuObj);
			var menuList = new Array();
			
			for(var i=0;i<mItems_var.length;i++){
				//alert(mItems_var[i].menuPk+"/"+mItems_var[i].parentMenuId+"/"+mItems_var[i].level);
				//alert(mItems_var[i].parentMenuId+"/"+mItems_var[i].level);
				//alert(mItems_var[i].level+"/"+(menuObj.level+1));
				if(mItems_var[i].parentMenuId == menuObj.menuPk && mItems_var[i].level == (menuObj.level+1)){
					menuList.push(mItems_var[i]);
				}
			}
			//alert(menuList.length);
			return menuList;
		}
		
		//通过一个菜单的主键和level来获得该菜单的对象
		function getMenuItemByMenuPk(menuObj){
			//循环从mItems_var中找parentMenuId==menuObj.menuPk and level=menuObj.level+1的menuObj，如果找到就break并返回
			//alert(menuObj.menuPk+"/"+menuObj.level);
			var obj;
			for(var i=0;i<mItems_var.length;i++){			
				if(mItems_var[i].menuPk == menuObj.menuPk && mItems_var[i].level == menuObj.level){
					obj = mItems_var[i];
					break;
				}
			}
			return obj;
		}
		
		//通过一个菜单的主键来获得该菜单的对象
		function getMenuItemByPk(pk){
			//alert(pk);
			var obj;
			//alert(mItems_var.length);
			for(var i=0;i<mItems_var.length;i++){			
				if(mItems_var[i].menuPk == pk){
					obj = mItems_var[i];
					break;
				}
			}
			return obj;
		}		
		
		//获得一级菜单项的列表
		var firstLevelMenus = getChildMenuItemByMenuPk({menuPk:'',level:0});
		//alert(firstLevelMenus.length);
		

		//根据获得一级菜单列表动态生成该级菜单的函数
		function createRootMenu(menuList){
			//alert(menuList.length);
			for(var i=0;i<menuList.length;i++){
				//alert(menuList[i].url);
				//alert(getChildMenuItemByMenuPk(menuList[i]).length);
				//document.write("<td class=\"top_style1\" width=\'2%\'  style='cursor:hand;' nowrap onmousedown=\'changeMenuColor(this)\' onclick=\'clickMenu({menuPk:\""+menuList[i].menuPk+"\",level:"+menuList[i].level+"});\'>");
				
				
				if((menuList[i].url!=""||getChildMenuItemByMenuPk(menuList[i]).length!=0)&&menuList[i].actived!='N'){
				    document.write("<td class=\"top_style1\" id='td_" + menuList[i].menuPk + "' width=\'2%\'  style='cursor:hand;' nowrap onmousedown=\'changeMenuColor(this)\' onclick=\'clickMenu({menuPk:\""+menuList[i].menuPk+"\",level:"+menuList[i].level+"});\'>");
					  //document.write("<a href=\'javascript:clickMenu({menuPk:\""+menuList[i].menuPk+"\",level:"+menuList[i].level+"});\'>&nbsp;"+menuList[i].description+"&nbsp;</a>");
					setMenuHref("onclick","changeMenuColor(document.getElementById('td_"+ menuList[i].menuPk + "'));clickMenu({menuPk:'"+menuList[i].menuPk+"',level:"+menuList[i].level+"})",menuList[i].menuPk);
				}else{
				    document.write("<td class=\"top_style1\" width=\'2%\' id='td_" + menuList[i].menuPk + "'  style='cursor:hand;' nowrap onmousedown=\'changeMenuColor(this)\'>");
				    setMenuHref("onclick","changeMenuColor(document.getElementById(document.td_"+ menuList[i].menuPk + "'))",menuList[i].menuPk);
				}
				
				document.write("&nbsp;"+menuList[i].description+"&nbsp;");
				
				document.write("</td>");
				if(i!=menuList.length-1){
					document.write('<td width="2%" align="center">|</td>');
				}
			}
			document.write('<td width="99%"></td>');	
		}	
	
		//改变框表格的样式
		function changeKuangTableTDObjClass(className){
			var tableObj = document.getElementById("kuangTable");
			var tdNode = tableObj.childNodes[0].childNodes[0].childNodes[0];
			tdNode.className = className;
		}
		
		
		//获得所有菜单中的是快捷键的菜单
		function getShortcutMenus(){
			var menuList = new Array();
			
			for(var i=0;i<mItems_var.length;i++){
				if(mItems_var[i].isShortcut == 'Y'){
					menuList.push(mItems_var[i]);
				}
			}
			return BubbleSort(menuList);					
		}
		
		function BubbleSort(arr) { //交换排序->冒泡排序
			  var temp;
			  var exchange;
			  for(var i=0; i<arr.length; i++) {
			   for(var j=arr.length-2; j>=i; j--) {
			    if((arr[j+1].shortCutSort) < (arr[j].shortCutSort)) {
			     temp = arr[j+1];
			     arr[j+1] = arr[j];
			     arr[j] = temp;
			     exchange = true;
			    }
			   }
			  }
			  return arr;
		}
		
		function setMenuHref(type,href,menuPk){
		    for(var i = 0; i<mItems_var.length; i++){
						if (mItems_var[i].menuPk==menuPk){   
				    		mItems_var[i].hrefType=type;
				    		mItems_var[i].href=href;
				    		break;
				    }
				}
		}
		
		<!--第三级菜单伸缩-->
		function switchSysBar(){
			var tar1=document.getElementById("frm1");
			var pic=document.getElementById("pic");
			if (tar1.style.display=="none"){
				tar1.style.display="";
				pic.src="../core/images/left_ctrl_left.gif";
			}else{
				tar1.style.display="none";
				pic.src="../core/images/left_ctrl_right.gif";
			}
		}
		
		function changeOperator(nodeId){
		   document.location.href="loginSuccess.do?nodeId=" + nodeId;
		}
		
		function gotoCaptionImport(){
			clickMenu({menuPk:'100000',level:1});   //一级菜单
			clickMenu({menuPk:'10000002',level:2}); //二级菜单
			
			//changeRootMenuColor();
			changeMenuColor(document.getElementById('td_100000'));
			changeMenuColor1({menuPk:'10000002',level:2});
		}
	</script>
	

<table width="100%" border="0" cellpadding="0" cellspacing="0" height="100%">
	<tr>
		<td height="57" valign="top">
		<table width="100%" height="57" border="0" cellpadding="0"	cellspacing="0">
			<tr>
				<td class="top_style">
				<table width="100%" height="57" border="0" cellpadding="0" cellspacing="0">
					<tr>
						<td width="35%" align="left" valign="middle" nowrap="nowrap" class="mosttop"><img src="${ctx}/core/images/top_08.gif"/></td>
						
						<td width="65%" align="right" valign="bottom" class="mosttop" nowrap="nowrap">
						<table width="100%" height="57" border="0" cellpadding="0" cellspacing="0">
							<tr>
								<td width="90%" align="right" class="white">
								&nbsp;<img
									src="${ctx}/core/images/icon_03.gif" width="10" height="11" />&nbsp;<s:text name="info.login.user"/><span class="green">${currOptr.login}</span>&nbsp;&nbsp;</td>
                                    <td>
									    <select name="" onChange="changeOperator(this.value)">
									      <option></option>
									       		<s:iterator value="nodeIdList" id="node" status="st">
									       		   <option value="<s:property value='#node[0]'/>" <s:if test='#node[0]==nodeId'>selected</s:if> ><s:property value='#node[1]'/></option> 
									       		</s:iterator>
									    </select>
									</td>
								<td width="10%" height="27" class="white" align="center" nowrap="nowrap">
								&nbsp;&nbsp;<a href="j_spring_security_logout" style="color:white"><s:text name='button.Exit'/></a> | <a href="#" style="color:white"><s:text name='info.Help'/></a>&nbsp;&nbsp;	
                                </td>
							</tr>
							<tr>
								<td height="30" colspan="3" valign="bottom">
								<table width="100%" height="30" border="0" cellpadding="0"	cellspacing="0">
									<tr>
										<td width="48" align="left" valign="top" class="bai"><img
											src="${ctx}/core/images/top_03.gif" width="48" height="30" /></td>
										<td align="left" background="${ctx}/core/images/top_04.gif">
										<table id="submenuTableLevel1" width="100%" height="30" border="0" cellpadding="0" cellspacing="0">
											<tr class="black_biaoticu">
												<script language="javascript">createRootMenu(firstLevelMenus);</script>
											</tr>
										</table>
										</td>
									</tr>
								</table>
								</td> 
							</tr>
						</table>
						</td>
					</tr>
				</table>
				</td>
				</tr>
				</table>
				</td>
			</tr>	
			<tr>
            <td height="100%" valign="top">   
   			<table width="100%" border="0" cellpadding="0" height="100%" cellspacing="0">	  
	   			    <tr id="submenuTableLevel2TR">

				        <td align="left" valign="top" width="100%" height="22">
                   	
							<table id="submenuTableLevel2" width="100%" height="22" border="0" cellpadding="0" cellspacing="0">
								<tr bgColor=#5B6C97>
									<c:choose>
									<c:when test="${showShorcut==false && hasShortCut==true}" >
	 							       <td id="resoreIconID" style="cursor:hand;" title="<s:text name='button.shortcutKey'/>"><img onclick='hiddenShortCut();' src='${ctx}/core/images/icon_arrowhead.gif'/></td>
	 							    </c:when>
	                                <c:otherwise>
	 							       <td id="resoreIconID"></td>
	 							    </c:otherwise>
	                                </c:choose>
									<td nowrap="nowrap"></td>
									<td width="100%">
										<s:if test="captionTaskCounts>0">
											<marquee scrollAmount=3 behavior=alternate onmouseover=stop() onmouseout=start() width=90%><a href="javascript:gotoCaptionImport();"><font color="white" size="2px"><s:text name='warm.info'/> ${captionTaskCounts} <s:text name='caption.task'/></font></a></marquee>
										</s:if>
									</td>
								</tr>
			
							</table>
					    </td>
				    </tr>
					<tr id="submenuTableLevel3TR" style="display:none">
						<td align="center" valign="top" >
							<table id="submenuTableLevel3" width="98%" height="10" border="0"
									cellpadding="0" cellspacing="0" >
									<tr>
									    <td></td>
										<td width="93%"></td>
									</tr>
								</table>
						</td>
					</tr>
				
	            <tr>
					<td valign="top" height="100%">
						<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" align="center" id="kuangTable">
							<tr>
					            <td height="100%" valign="top">   
									<iframe name="mainframe" width="100%" height="100%" scrolling="auto" frameborder="0" marginheight="0" marginwidth="0" src="${pageContext.request.contextPath}/${defaultPage}"></iframe></td>
							   </td>
						   </tr>
						</table>
					</td>
				</tr></table>
		
		</tr>
		</td>
		
		<tr>
			<td height="30"><table width="100%" height="40" border="0" cellpadding="0" cellspacing="0" class="bottom">
		    <tr>
		      <td height="30" align="center" valign="middle">&copy; 2011 BEE MediaSoft. All rights reserved.</td>
		    </tr>
	  </table>
		</td>
	</tr>
</table>
<script>
	if(defaultDisGroupKey !=""){
		disabledMenuGroup('${defaultDisGroupKey}');
	}
</script>
</c:when>
<c:otherwise>
	<!--没有菜单,返回登录页-->
	<script>
		window.location = "login.action";
	</script>
</c:otherwise>
</c:choose>





